package com.heimdallr.rbac.permission.entity;

import java.io.Serializable;

/**
 *
 * @author Administrator
 * @date 2016/8/3
 */
public class PermissionEntity implements Serializable {


    public PermissionEntity(){
        super();
    }

    public PermissionEntity(int id,String name,String mapping,String url,int type){
        this.id = id;
        this.name = name;
        this.mapping = mapping;
        this.url = url;
        this.type = type;
    }

    private int id;
    private String name;
    private String mapping;
    private String url;

    /**
     * 1说明是页面请求，2说明是ajax请求
     */
    private int type;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getMapping() {
        return mapping;
    }

    public void setMapping(String mapping) {
        this.mapping = mapping;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PermissionEntity that = (PermissionEntity) o;

        return id == that.id;
    }

    @Override
    public int hashCode() {
        return id;
    }
}
